import sympy as sym


def myAnd(a, b):
    """
    Returns logical AND result of a and b

    Args:
        a : symbolic expression.
        b : symbolic expression.

    Returns:
        the result of a and b(a & b).
    """
    return sym.And(a,b)


# Test case 1: Input is pure boolean
x1 = True
x2 = False
assert myAnd(x1, x2) == False
assert myAnd(x1, not x2) == True

# Test case 2: Input is boolean expressions
x1 = 10 > 20
x2 = 5 == 5
assert myAnd(x1, x2) == False
assert myAnd(not x1, x2) == True

# Test case 3: Input is symbolic expressions
x,y = sym.symbols('x y')
x1 = x ^ y
x2 = ~y
assert myAnd(x1, x2) == x1 & x2
assert myAnd(~x1, x2) == ~x1 & x2

# Test case 4: Illegal input
x1 = 5
x2 = "abc"
try:
    myAnd(x1,x2)
except sym.SympifyError:
    pass
else:
    raise AssertionError("Expected TypeError for unsupported input type")

